-- card: 5770 from stack: in -- bmap block id: 0 -- flags: 0000 -- background id: 3241 -- name: -- part 1 (button) -- low flags: 00 -- high flags: A003 -- rect: left=83 top=300 right=322 bottom=183 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: PICTFileToRes ----- HyperTalk script ----- on mouseUp put PICTFileToRes end mouseUp -- part contents for background part 16 ----- text ----- PICTFILETORES version 1.0 Kevin Calhoun PICTFileToRes creates a PICT resource from a PICT file and copies it into the current stack. You can tell ClipToPICT what ID number you want the PICT resource to have, or you can let it select an unused number for you. If you choose a number that belongs to another PICT resource currently contained in your stack, the new picture will overwrite the old one. PICTFileToRes allows the user to choose the PICT file to copy from from a standard file dialog box. INVOKING PICTFILETORES get PICTFileToRes(pictID,pictName) result: resourceID Both parameters are optional. If you don't pass a value for pictID, PICTFileToRes will find an ID for the PICT resource that's not currently in use. If you don't pass a value for pictName, the PICT resource will be unnamed. If you pass a value for pictID or pictName that's already in use by another PICT resource in the current stack, the old PICT will be overwritten. If an error occurs, PICTFileToRes will return an error message. Word 1 of this message will be "Error." EXAMPLES put PICTFileToRes(0,"The Little Engine That Could") into pictNumber get PICTFileToRes REVISION HISTORY 1.0 -- 4/22/88